home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-22 | 833 b | 26 lines | [TEXT/MACV] |
- "Select the following statements and execute
- with Do It to play Hexapawn against the
- computer (you play White)."
-
- |p1 p2 board allPlayers|
- board := HexapawnGameBoard new.
- GameMonitor initialize: board.
- p1 := HexapawnHumanPlayer new: 'White' marker: 'W'.
- p2 := HexapawnComputerPlayer new: 'Black' marker: 'B'.
- allPlayers := Array new: 2.
- allPlayers at: 1 put: p1; at: 2 put: p2.
- board startPlay: allPlayers.
-
- "Select the following statements and execute
- with Do It to play Tic Tac Toe against the
- computer (you play X, which moves first)."
-
- |p1 p2 board allPlayers|
- board := TicTacToeGameBoard new.
- GameMonitor initialize: board.
- p1 := TicTacToeHumanPlayer new: 'X' marker: 'X'.
- p2 := TicTacToeComputerPlayer new: 'O' marker:'O'.
- allPlayers := Array new: 2.
- allPlayers at: 1 put: p1; at: 2 put: p2.
- board startPlay: allPlayers.
-